﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using SuperMarioClone.Managers;

namespace SuperMarioClone.Screens
{
    class MenuScreen : Screen
    {
        Texture2D MenuLogo;
        TileManager tileManager;

        public MenuScreen(Rectangle screeenSize)
            : base(screeenSize)
        {
            MenuLogo = Content_Manager.getInstance().Textures["menu"];
            
            tileManager = new TileManager();
            tileManager.AddTile(Content_Manager.getInstance().Textures["scenery_1"], new Vector2(13, ScreenSize.Height / 40 - 3));
            tileManager.AddTile(Content_Manager.getInstance().Textures["scenery_2"], new Vector2(2, ScreenSize.Height / 40 - 7));
            tileManager.AddTile(Content_Manager.getInstance().Textures["mario1"], new Vector2(6, ScreenSize.Height / 40 - 5), new Vector2(0,35));

            for (int x = 0; x < ScreenSize.Width / 42; x++)
            {
                tileManager.AddTile(Content_Manager.getInstance().Textures["tile_brown_1"], new Vector2(x, ScreenSize.Height/40 - 1));
                tileManager.AddTile(Content_Manager.getInstance().Textures["tile_brown_1"], new Vector2(x, ScreenSize.Height / 40 - 2));
            }
            
        }
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(MenuLogo, new Vector2(ScreenSize.Width/2 - MenuLogo.Width/2 ,100), Color.White);
            tileManager.Draw(spriteBatch);
        }
    }
}

